﻿<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title>学生惠后台管理系统</title>
    <link rel="stylesheet" href="/App/Admin/public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/App/Admin/public/css/style.css"/>
</head>
<body>
<div class="mainBody">
        <include file="Public:left"/>
    <div class="main">
        <include file="Public:top"/>

        <div class="subNav">
            <span class="text"><i class="iconFont">&#xe600;</i>BANNER管理</span>
        </div>

        <div class="indexBox">
            <div class="con-det">
                <div class="row">
                    <div class="col-md-12">
                        <form action="{:U('Banner/index')}" method="post">
                        <table class="formTable">
                            <tbody>
                            <tr>
                                <td class="name noBor">类别</td>
                                <td class="noBor">
                                   <select  name="ban_type" class="inp form-control" style="width:40%;" >
                                         <option value="">全部</option>
                                        <foreach name="typeArr" item="val">
                                               <option value="{$key}"   <if condition="$key eq $shArray['ban_type']"> selected </if>  >{$val}</option>
                                          </foreach>
                                     </select>
                                  
                                </td>
                            </tr>
                            <tr>
                                <td class="name"></td>
                                <td>
                                     <button class="btn btn-primary blue" type="submit">查询</button>
                                    <a href="{:U('Banner/add')}" class="btn btn-default">新增</a>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                         </form>
                    </div>
                </div>

                <div class="mt40 listBox">
                    <div class="listScroll">
                        <table class="table table-striped">
                            <tr>
                                <th>类别</th>
                                <th>名称</th>
                                <th>图片</th>
                                <th>发布时间</th>
                                <th>操作</th>
                            </tr>
                              <foreach name="list" item="item">
                            <tr>
                                <td><if condition="$item.ban_type eq 1">主页<else/>聚餐美食</if></td>
                                <td>{$item.name}</td>
                                <td><img src="/Uploads/bann/{$item.ban_pic}" style="width:80px;height:100px"></td>
                                <td>{$item.add_time|date='Y-m-d',###}</td>
                                <td>
                                    <a href="{:U('Banner/edit','&id='.$item['id'])}" class="btn btn-default btn-xs">编辑</a>
                                    <a href="{:U('Banner/del','&id='.$item['id'])}" onClick="javascript:if(confirm('请确认是否删除该图片？')){return true;}else{return false;}"  class="btn btn-default btn-xs ">删除</a>
                                </td>
                            </tr>
                               </foreach>
                        </table>
                    </div>
                    <nav aria-label="Page navigation">
                        <ul class="pagination fr">
                           {$page}
                        </ul>
                    </nav>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade popupDelSetBan" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">提示：</h4>
            </div>
            <div class="modal-body">
                <p>请确认是否删除此banner信息！</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary blue">确认</button>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="/App/Admin/public/js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/App/Admin/public/js/public.js"></script>
</body>
</html>








